import { ref } from 'vue'
import request from '@/utils/request.js'

//查询当前作业详细
export const select = (taskId) => {
   return request.get('/student/selectTaskManager/' + taskId)
}
//添加作业
export const addTaskManger = (taskManger) => {
   return request.post("/student/uptask", taskManger)
}
//添加作业保存到redis
export const addTaskSave = (taskSave) => {
   return request.post("/student/insertTaskRedis", taskSave)
}
//从redis中取出当前用户保存的作业
export const selectTaskSave = (taskId) => {
   return request.get("/student/getTaskRedis/" + taskId)
}
//作业名称模糊查询
export const selectTaskName = (taskName, courseId) => {
   return request.get("/task/selectTask/" + taskName + "/" + courseId)
}
//课程编号查询作业数量
export const selectTaskCount = (courseId) => {
   return request.get("/task/getTaskNum?courseId=" + courseId)
}
